function upload(params) {
  let config = {
    type: "*.jpeg,*.png",
    size: 9999
  };
  config = { ...config, ...params };
  console.log(config);
}
upload({ size: 99, type: "*.gif" });
